package com.cowin.sys.service.impl;

import com.cowin.sys.dao.TmSysResourceMapper;
import com.cowin.sys.model.TmSysResource;
import com.cowin.sys.service.TmSysResourceService;
import com.cowin.base.AbstractServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


/**
 * Created by  on 2019/09/18.
 *
 * @author CodeGenerator
 */
@Slf4j
@Service
@Transactional(rollbackFor = RuntimeException.class)
public class TmSysResourceServiceImpl extends AbstractServiceImpl<TmSysResource> implements TmSysResourceService {

    @Resource
    private TmSysResourceMapper tmSysResourceMapper;

    @Override
    public List<TmSysResource> findResourceByLoginUser(Long userId) {
        return tmSysResourceMapper.getResourceByLoginUserId(userId);
    }
}
